<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-dropdown @command="handleCommand">
  <span class="el-dropdown-link">
    下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
  </span>
        <el-dropdown-menu slot="dropdown">
            <el-dropdown-item v-for="i in arr" :command ="i.price">{{i.title}}</el-dropdown-item>
        </el-dropdown-menu>
    </el-dropdown>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
   let v= new Vue({
        el: '#app',
        data: function() {
            return {
                arr:[{title:"小米手机",price:3000},
                    {title:"华为手机",price:4000},
                    {title:"苹果手机",price:5000},
                    {title:"菠萝手机",price:6000},]
            }
        },
       methods:{
           handleCommand(command) {
               v.$message( "您选择的商品是"+command+"元");

           }
       }
    })
</script>
</html>